import request from '@/axios'
import { SysFileFailReasonDetailVo, SysFileFailReasonEditQo, SysFileFailReasonListVo, SysFileFailReasonSearchQo } from './types'
import { BaseDeleteQo } from '@/base/api/BaseQo'
import { KeyLabelValueVo } from '@/base/api/KeyLabelValueVo'

export const sysFileFailReasonPageApi = (data: SysFileFailReasonSearchQo): Promise<IResponse<Array<SysFileFailReasonListVo>>> => {
  return request.post({ url: '/sysFileFailReason/page.adw', data })
}

export const sysFileFailReasonDetailApi = (id: number): Promise<IResponse<SysFileFailReasonDetailVo>> => {
  const data = { id }
  return request.post({
    url: '/sysFileFailReason/detail.adw',
    data
  })
}

export const sysFileFailReasonAddApi = (data: SysFileFailReasonEditQo): Promise<IResponse<number>> => {
  return request.post({ url: '/sysFileFailReason/add.adw', data })
}

export const sysFileFailReasonUpdateApi = (data: SysFileFailReasonEditQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysFileFailReason/update.adw', data })
}

export const sysFileFailReasonDeleteApi = (data: BaseDeleteQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysFileFailReason/delete.adw', data })
}

// [[ OnflowGenerator Range (- selectFunctions -) Start ]]

// [[ OnflowGenerator Range (- selectFunctions -) End ]]
